<template>
    <h3>父组件</h3>
    <p>{{ message }}</p>
    <Child title="标题" :onEvent="dataFn" />
</template>
<script>
import Child from './Child.vue'
export default {
    data() {
        return {
            message: ''
        }
    },
    components: {
        Child
    },
    methods: {
        dataFn(data) {
            this.message = data
        }
    }
}
</script>